TSource
IdeaBlade DevForce 2010 Help Reference
DefaultIfEmpty<TSource>(IEntityQuery<TSource>,TSource) Method
See Also  Send Feedback
IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > DefaultIfEmpty Method : DefaultIfEmpty<TSource>(IEntityQuery<TSource>,TSource) Method



source
defaultValue
Returns the elements in a sequence or a default valued singleton collection if the sequence is empty.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Overloads Shared Function DefaultIfEmpty(Of TSource)( _
   ByVal source As IEntityQuery(Of TSource), _
   ByVal defaultValue As TSource _
) As IEntityQuery(Of TSource)
Visual Basic (Usage)Copy Code
Dim source As IEntityQuery(Of TSource)
Dim defaultValue As TSource
Dim value As IEntityQuery(Of TSource)
 
value = EntityQueryExtensions.DefaultIfEmpty(Of TSource)(source, defaultValue)
C++/CLI 
[ExtensionAttribute()]
public:
static IEntityQuery<TSource^>^ DefaultIfEmptygeneric<typename TSource>
( 
   IEntityQuery<TSource^>^ source,
   TSource^ defaultValue
) 

Parameters

source
defaultValue

Type Parameters

TSource

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.